/*
 * XML Type:  UseCaseMap
 * Namespace: http:///org/isistan/flabot/coremodel.ecore
 * Java type: org.isistan.flabot.coremodelEcore.UseCaseMap
 *
 * Automatically generated - do not modify.
 */
package org.isistan.flabot.coremodelEcore.impl;
/**
 * An XML UseCaseMap(@http:///org/isistan/flabot/coremodel.ecore).
 *
 * This is a complex type.
 */
public class UseCaseMapImpl extends org.isistan.flabot.coremodelEcore.impl.NamedElementModelImpl implements org.isistan.flabot.coremodelEcore.UseCaseMap
{
    private static final long serialVersionUID = 1L;
    
    public UseCaseMapImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PATHS$0 = 
        new javax.xml.namespace.QName("", "paths");
    private static final javax.xml.namespace.QName COMPONENTROLES$2 = 
        new javax.xml.namespace.QName("", "componentRoles");
    private static final javax.xml.namespace.QName COREMODEL$4 = 
        new javax.xml.namespace.QName("", "coreModel");
    private static final javax.xml.namespace.QName DESCRIPTION$6 = 
        new javax.xml.namespace.QName("", "description");
    private static final javax.xml.namespace.QName COREMODEL2$8 = 
        new javax.xml.namespace.QName("", "coreModel");
    private static final javax.xml.namespace.QName LEVELINFO$10 = 
        new javax.xml.namespace.QName("", "levelInfo");
    private static final javax.xml.namespace.QName PATHS2$12 = 
        new javax.xml.namespace.QName("", "paths");
    private static final javax.xml.namespace.QName COMPONENTROLE$14 = 
        new javax.xml.namespace.QName("", "componentRole");
    
    
    /**
     * Gets array of all "paths" elements
     */
    public org.isistan.flabot.coremodelEcore.Path[] getPathsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(PATHS2$12, targetList);
            org.isistan.flabot.coremodelEcore.Path[] result = new org.isistan.flabot.coremodelEcore.Path[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "paths" element
     */
    public org.isistan.flabot.coremodelEcore.Path getPathsArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Path target = null;
            target = (org.isistan.flabot.coremodelEcore.Path)get_store().find_element_user(PATHS2$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "paths" element
     */
    public int sizeOfPathsArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PATHS2$12);
        }
    }
    
    /**
     * Sets array of all "paths" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setPathsArray(org.isistan.flabot.coremodelEcore.Path[] pathsArray)
    {
        check_orphaned();
        arraySetterHelper(pathsArray, PATHS2$12);
    }
    
    /**
     * Sets ith "paths" element
     */
    public void setPathsArray(int i, org.isistan.flabot.coremodelEcore.Path paths)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Path target = null;
            target = (org.isistan.flabot.coremodelEcore.Path)get_store().find_element_user(PATHS2$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(paths);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "paths" element
     */
    public org.isistan.flabot.coremodelEcore.Path insertNewPaths(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Path target = null;
            target = (org.isistan.flabot.coremodelEcore.Path)get_store().insert_element_user(PATHS2$12, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "paths" element
     */
    public org.isistan.flabot.coremodelEcore.Path addNewPaths()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Path target = null;
            target = (org.isistan.flabot.coremodelEcore.Path)get_store().add_element_user(PATHS2$12);
            return target;
        }
    }
    
    /**
     * Removes the ith "paths" element
     */
    public void removePaths(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PATHS2$12, i);
        }
    }
    
    /**
     * Gets array of all "componentRoles" elements
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole[] getComponentRolesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(COMPONENTROLES$2, targetList);
            org.isistan.flabot.coremodelEcore.ComponentRole[] result = new org.isistan.flabot.coremodelEcore.ComponentRole[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "componentRoles" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole getComponentRolesArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().find_element_user(COMPONENTROLES$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "componentRoles" element
     */
    public int sizeOfComponentRolesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(COMPONENTROLES$2);
        }
    }
    
    /**
     * Sets array of all "componentRoles" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setComponentRolesArray(org.isistan.flabot.coremodelEcore.ComponentRole[] componentRolesArray)
    {
        check_orphaned();
        arraySetterHelper(componentRolesArray, COMPONENTROLES$2);
    }
    
    /**
     * Sets ith "componentRoles" element
     */
    public void setComponentRolesArray(int i, org.isistan.flabot.coremodelEcore.ComponentRole componentRoles)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().find_element_user(COMPONENTROLES$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(componentRoles);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "componentRoles" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole insertNewComponentRoles(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().insert_element_user(COMPONENTROLES$2, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "componentRoles" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentRole addNewComponentRoles()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentRole target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentRole)get_store().add_element_user(COMPONENTROLES$2);
            return target;
        }
    }
    
    /**
     * Removes the ith "componentRoles" element
     */
    public void removeComponentRoles(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(COMPONENTROLES$2, i);
        }
    }
    
    /**
     * Gets array of all "coreModel" elements
     */
    public org.isistan.flabot.coremodelEcore.CoreModel[] getCoreModelArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(COREMODEL2$8, targetList);
            org.isistan.flabot.coremodelEcore.CoreModel[] result = new org.isistan.flabot.coremodelEcore.CoreModel[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "coreModel" element
     */
    public org.isistan.flabot.coremodelEcore.CoreModel getCoreModelArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.CoreModel target = null;
            target = (org.isistan.flabot.coremodelEcore.CoreModel)get_store().find_element_user(COREMODEL2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "coreModel" element
     */
    public int sizeOfCoreModelArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(COREMODEL2$8);
        }
    }
    
    /**
     * Sets array of all "coreModel" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setCoreModelArray(org.isistan.flabot.coremodelEcore.CoreModel[] coreModelArray)
    {
        check_orphaned();
        arraySetterHelper(coreModelArray, COREMODEL2$8);
    }
    
    /**
     * Sets ith "coreModel" element
     */
    public void setCoreModelArray(int i, org.isistan.flabot.coremodelEcore.CoreModel coreModel)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.CoreModel target = null;
            target = (org.isistan.flabot.coremodelEcore.CoreModel)get_store().find_element_user(COREMODEL2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(coreModel);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "coreModel" element
     */
    public org.isistan.flabot.coremodelEcore.CoreModel insertNewCoreModel(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.CoreModel target = null;
            target = (org.isistan.flabot.coremodelEcore.CoreModel)get_store().insert_element_user(COREMODEL2$8, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "coreModel" element
     */
    public org.isistan.flabot.coremodelEcore.CoreModel addNewCoreModel()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.CoreModel target = null;
            target = (org.isistan.flabot.coremodelEcore.CoreModel)get_store().add_element_user(COREMODEL2$8);
            return target;
        }
    }
    
    /**
     * Removes the ith "coreModel" element
     */
    public void removeCoreModel(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(COREMODEL2$8, i);
        }
    }
    
    /**
     * Gets the "description" attribute
     */
    public java.lang.String getDescription()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESCRIPTION$6);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "description" attribute
     */
    public org.apache.xmlbeans.XmlString xgetDescription()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(DESCRIPTION$6);
            return target;
        }
    }
    
    /**
     * True if has "description" attribute
     */
    public boolean isSetDescription()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(DESCRIPTION$6) != null;
        }
    }
    
    /**
     * Sets the "description" attribute
     */
    public void setDescription(java.lang.String description)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESCRIPTION$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DESCRIPTION$6);
            }
            target.setStringValue(description);
        }
    }
    
    /**
     * Sets (as xml) the "description" attribute
     */
    public void xsetDescription(org.apache.xmlbeans.XmlString description)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(DESCRIPTION$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(DESCRIPTION$6);
            }
            target.set(description);
        }
    }
    
    /**
     * Unsets the "description" attribute
     */
    public void unsetDescription()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(DESCRIPTION$6);
        }
    }
    
    /**
     * Gets the "coreModel" attribute
     */
    public java.lang.String getCoreModel2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COREMODEL2$8);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "coreModel" attribute
     */
    public org.apache.xmlbeans.XmlString xgetCoreModel2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COREMODEL2$8);
            return target;
        }
    }
    
    /**
     * True if has "coreModel" attribute
     */
    public boolean isSetCoreModel2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(COREMODEL2$8) != null;
        }
    }
    
    /**
     * Sets the "coreModel" attribute
     */
    public void setCoreModel2(java.lang.String coreModel2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COREMODEL2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(COREMODEL2$8);
            }
            target.setStringValue(coreModel2);
        }
    }
    
    /**
     * Sets (as xml) the "coreModel" attribute
     */
    public void xsetCoreModel2(org.apache.xmlbeans.XmlString coreModel2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COREMODEL2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(COREMODEL2$8);
            }
            target.set(coreModel2);
        }
    }
    
    /**
     * Unsets the "coreModel" attribute
     */
    public void unsetCoreModel2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(COREMODEL2$8);
        }
    }
    
    /**
     * Gets the "levelInfo" attribute
     */
    public java.lang.String getLevelInfo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(LEVELINFO$10);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "levelInfo" attribute
     */
    public org.apache.xmlbeans.XmlString xgetLevelInfo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(LEVELINFO$10);
            return target;
        }
    }
    
    /**
     * True if has "levelInfo" attribute
     */
    public boolean isSetLevelInfo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(LEVELINFO$10) != null;
        }
    }
    
    /**
     * Sets the "levelInfo" attribute
     */
    public void setLevelInfo(java.lang.String levelInfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(LEVELINFO$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(LEVELINFO$10);
            }
            target.setStringValue(levelInfo);
        }
    }
    
    /**
     * Sets (as xml) the "levelInfo" attribute
     */
    public void xsetLevelInfo(org.apache.xmlbeans.XmlString levelInfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(LEVELINFO$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(LEVELINFO$10);
            }
            target.set(levelInfo);
        }
    }
    
    /**
     * Unsets the "levelInfo" attribute
     */
    public void unsetLevelInfo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(LEVELINFO$10);
        }
    }
    
    /**
     * Gets the "paths" attribute
     */
    public java.lang.String getPaths2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PATHS2$12);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "paths" attribute
     */
    public org.apache.xmlbeans.XmlString xgetPaths2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(PATHS2$12);
            return target;
        }
    }
    
    /**
     * True if has "paths" attribute
     */
    public boolean isSetPaths2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(PATHS2$12) != null;
        }
    }
    
    /**
     * Sets the "paths" attribute
     */
    public void setPaths2(java.lang.String paths2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PATHS2$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PATHS2$12);
            }
            target.setStringValue(paths2);
        }
    }
    
    /**
     * Sets (as xml) the "paths" attribute
     */
    public void xsetPaths2(org.apache.xmlbeans.XmlString paths2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(PATHS2$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(PATHS2$12);
            }
            target.set(paths2);
        }
    }
    
    /**
     * Unsets the "paths" attribute
     */
    public void unsetPaths2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(PATHS2$12);
        }
    }
    
    /**
     * Gets the "componentRole" attribute
     */
    public java.lang.String getComponentRole()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COMPONENTROLE$14);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "componentRole" attribute
     */
    public org.apache.xmlbeans.XmlString xgetComponentRole()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COMPONENTROLE$14);
            return target;
        }
    }
    
    /**
     * True if has "componentRole" attribute
     */
    public boolean isSetComponentRole()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(COMPONENTROLE$14) != null;
        }
    }
    
    /**
     * Sets the "componentRole" attribute
     */
    public void setComponentRole(java.lang.String componentRole)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COMPONENTROLE$14);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(COMPONENTROLE$14);
            }
            target.setStringValue(componentRole);
        }
    }
    
    /**
     * Sets (as xml) the "componentRole" attribute
     */
    public void xsetComponentRole(org.apache.xmlbeans.XmlString componentRole)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COMPONENTROLE$14);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(COMPONENTROLE$14);
            }
            target.set(componentRole);
        }
    }
    
    /**
     * Unsets the "componentRole" attribute
     */
    public void unsetComponentRole()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(COMPONENTROLE$14);
        }
    }
}
